package kgc.qy.controller;

import kgc.qy.pojo.SysUsers;
import kgc.qy.service.IAuthorService;
import kgc.qy.util.CommonResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;


@RestController
@RequestMapping(value = "auth")
@CrossOrigin
public class AuthorController {
    @Autowired
    private IAuthorService authorService;

    @PostMapping(value = "login")
    public CommonResult<SysUsers> login(String account,String password){
        System.out.println(account+"\t"+password);
        //设置Cookie
        return authorService.login(account, password);
    }
}
